/*
 * Copyright (c) 2010 Zauber S.A.  -- All rights reserved
 */
package ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.bitwise;

import java.util.Iterator;
import java.util.ListIterator;

/**
 * Iterador de expresiones
 * 
 * @author Juan F. Codagnone
 * @since Mar 27, 2010
 * @param <T> t
 */
public class VarArgIterator<T> implements ListIterator<T> {
    private final T [] expresion; 
    private short i;

    /** Creates the ExpresionIterator. */
    public VarArgIterator(final T ...expresion) {
        assert  expresion != null;
        this.expresion = expresion;
    }
    
    
    /** @see Iterator#hasNext() */
    public final boolean hasNext() {
        return i < expresion.length;
    }

    /** @see Iterator#next() */
    public final T next() {
        return expresion[i++];
    }

    /** @see Iterator#remove() */
    public final void remove() {
        throw new UnsupportedOperationException();
    }


    /** @see ListIterator#add(Object) */
    public final void add(final T e) {
        throw new UnsupportedOperationException();
    }


    /** @see ListIterator#hasPrevious() */
    public final boolean hasPrevious() {
        throw new UnsupportedOperationException();
    }


    /** @see ListIterator#nextIndex() */
    public final int nextIndex() {
        throw new UnsupportedOperationException();
    }


    /** @see ListIterator#previous() */
    public final T previous() {
        throw new UnsupportedOperationException();
    }


    /** @see ListIterator#previousIndex() */
    public final int previousIndex() {
        throw new UnsupportedOperationException();
    }


    /** @see ListIterator#set(Object) */
    public final void set(final T e) {
        throw new UnsupportedOperationException();        
    }
}
